home *** CD-ROM | disk | FTP | other *** search
- Okay, here is a simple minded rubberbanding example.
- There is a minor bug in it that sometimes leaves a small WHITE image
- on the canvas, but I will leave that to the student to fix :-)
-
- Although the rubberbanding does not DO anything, adding that functionality
- would not be difficult ( I have already done so, with a CAD style program).
- One approach would be to use the final shape (rectangle, ellipse) as a region
- and check all drawn 'objects' for inclusion in the region's space. Of course,
- this requires you to keep a list of objects drawn on the work area, so you can
- check bounding coords against the banded area. The best place to do this is in
- the MouseUp handler, after the final shape has been drawn.
-
- I leave it to you to experiment with different, multiple background colors
- (does the rubberband disappear?), and other considerations.
-
- Have Fun!
-
-